import request from '@/utils/request'

// 查询学习资料列表
export function listLearningMaterials(query) {
  return request({
    url: '/fileMaintenance/learningMaterials/list',
    method: 'get',
    params: query
  })
}

// 查询学习资料详细
export function getLearningMaterials(id) {
  return request({
    url: '/fileMaintenance/learningMaterials/' + id,
    method: 'get'
  })
}

// 新增学习资料
export function addLearningMaterials(data) {
  return request({
    url: '/fileMaintenance/learningMaterials',
    method: 'post',
    data: data
  })
}

// 修改学习资料
export function updateLearningMaterials(data) {
  return request({
    url: '/fileMaintenance/learningMaterials',
    method: 'put',
    data: data
  })
}

// 删除学习资料
export function delLearningMaterials(id) {
  return request({
    url: '/fileMaintenance/learningMaterials/' + id,
    method: 'delete'
  })
}
